import request from "../request";
// 查询用户个人信息
export function getUserProfile() {
    return request({
        url: '/system/user/profile',
        method: 'get'
    })
}
//新增或修改银行信息
export function addOrUpdateYh(query, code) {
    return request({
        url: '/workbench/userBase/batch/userBank/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改合同信息
export function addOrUpdateHt(query, code) {
    return request({
        url: '/workbench/userBase/batch/userLdht/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改学历信息
export function addOrUpdateEdu(query, code) {
    return request({
        url: '/workbench/userBase/batch/userEdu/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改工作信息
export function addOrUpdateWork(query, code) {
    return request({
        url: '/workbench/userBase/batch/userWork/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改家庭信息
export function addOrUpdateFamily(query, code) {
    return request({
        url: '/workbench/userBase/batch/userFamily/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改专业技术信息
export function addOrUpdateJiShu(query, code) {
    return request({
        url: '/workbench/userBase/batch/userZc/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改职业技能信息
export function addOrUpdateJiNeng(query, code) {
    return request({
        url: '/workbench/userBase/batch/userJn/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改其他技能信息
export function addOrUpdateOther(query, code) {
    return request({
        url: '/workbench/userBase/batch/userOther/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改获奖信息
export function addOrUpdateHj(query, code) {
    return request({
        url: '/workbench/userBase/batch/userAwa/' + code,
        method: 'post',
        data: query
    })
}
//新增或修改执业资格信息
export function addOrUpdateZy(query, code) {
    return request({
        url: '/workbench/userBase/batch/userZyzc/' + code,
        method: 'post',
        data: query
    })
}
// 新
//人员基本信息查询
export function searchUserInfo(data) {
    return request({
        url: '/workbench/userBase/list',
        method: 'post',
        data: data
    })
}
//新增或修改基本人员信息

export function addOrUpdateBaseUserInfo(data) {
    if (data.baseinfoId) {
        return updateBaseInfo(data)
    }
    return addUser(data)
}

//新增基本人员信息
export function addUser(data) {
    return request({
        url: '/workbench/userBase/save',
        method: 'post',
        data: data
    })
}
//修改基本人员信息
export function updateBaseInfo(data) {
    return request({
        url: '/workbench/userBase/update',
        method: 'post',
        data: data
    })
}
//删除人员基本信息
export function deleteUserInfo(query) {
    return request({
        url: '/workbench/userBase/delete/' + query,
        method: 'delete',
        // data: data
    })
}
//根据人员编号获取详细信息
export function getUserInfo(query) {
    return request({
        url: '/workbench/userBase/selectByUserCode',
        method: 'get',
        data: query
    })
}
